package com.lei2j.iterator;

public class MenuItem extends MenuComponent {

	private String name;
	
	private String description;
	
	private double price;
	
	private boolean vegetarian;
	
	public MenuItem(String name, String description, double price, boolean vegetarian) {
		super();
		this.name = name;
		this.description = description;
		this.price = price;
		this.vegetarian = vegetarian;
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public String getDesciption() {
		return this.description;
	}

	@Override
	public double getPrice() {
		return this.price;
	}

	@Override
	public boolean isVegetarian() {
		return this.vegetarian;
	}

	@Override
	public void print() {
		System.out.println(String.format("Name:%s,Description:%s,Price:%f,IsVegetarian:%b", this.name, this.description,
				this.price, this.vegetarian));
	}
	
	public static void main(String[] args) {
		MenuItem menuItem = new MenuItem("鸡腿", "肉质鲜嫩", 12.2, false);
		menuItem.print();
	}
	
}
